package com.zr.model;
// Generated 2017-6-29 19:45:38 by Hibernate Tools 4.0.0.Final

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Creceipt generated by hbm2java
 */
@Entity
@Table(name = "creceipt", catalog = "cqlwlps")
public class Creceipt implements java.io.Serializable {

	private Integer reid;
	private Ccarreport ccarreport;
	private String restartp;
	private String reendp;
	private String redate;
	private int did;
	private int oid;
	private Integer uid;
	private Set<Csealing> csealings = new HashSet<Csealing>(0);

	public Creceipt() {
	}

	public Creceipt(Ccarreport ccarreport, String restartp, String reendp, int did, int oid) {
		this.ccarreport = ccarreport;
		this.restartp = restartp;
		this.reendp = reendp;
		this.did = did;
		this.oid = oid;
	}

	public Creceipt(Ccarreport ccarreport, String restartp, String reendp, String redate, int did, int oid, Integer uid,
			Set<Csealing> csealings) {
		this.ccarreport = ccarreport;
		this.restartp = restartp;
		this.reendp = reendp;
		this.redate = redate;
		this.did = did;
		this.oid = oid;
		this.uid = uid;
		this.csealings = csealings;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "reid", unique = true, nullable = false)
	public Integer getReid() {
		return this.reid;
	}

	public void setReid(Integer reid) {
		this.reid = reid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "crid", nullable = false)
	public Ccarreport getCcarreport() {
		return this.ccarreport;
	}

	public void setCcarreport(Ccarreport ccarreport) {
		this.ccarreport = ccarreport;
	}

	@Column(name = "restartp", nullable = false)
	public String getRestartp() {
		return this.restartp;
	}

	public void setRestartp(String restartp) {
		this.restartp = restartp;
	}

	@Column(name = "reendp", nullable = false)
	public String getReendp() {
		return this.reendp;
	}

	public void setReendp(String reendp) {
		this.reendp = reendp;
	}

	@Column(name = "redate")
	public String getRedate() {
		return this.redate;
	}

	public void setRedate(String redate) {
		this.redate = redate;
	}

	@Column(name = "did", nullable = false)
	public int getDid() {
		return this.did;
	}

	public void setDid(int did) {
		this.did = did;
	}

	@Column(name = "oid", nullable = false)
	public int getOid() {
		return this.oid;
	}

	public void setOid(int oid) {
		this.oid = oid;
	}

	@Column(name = "uid")
	public Integer getUid() {
		return this.uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "creceipt")
	public Set<Csealing> getCsealings() {
		return this.csealings;
	}

	public void setCsealings(Set<Csealing> csealings) {
		this.csealings = csealings;
	}

}
